package com.dhcc.model;

import javax.persistence.*;

/**
 * Created by guorui on 2017/3/17.
 */
@Entity
@Table(name = "tb_kcdy_question", schema = "test", catalog = "")
public class KcdyQuestion {
    private int queId;
    private int userId;
    private String content;
    private String ansTime;

    @Id
    @Column(name = "que_id", nullable = false)
    public int getQueId() {
        return queId;
    }

    public void setQueId(int queId) {
        this.queId = queId;
    }

    @Basic
    @Column(name = "user_id", nullable = false)
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "content", nullable = true, length = 255)
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "ans_time", nullable = true, length = 20)
    public String getAnsTime() {
        return ansTime;
    }

    public void setAnsTime(String ansTime) {
        this.ansTime = ansTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        KcdyQuestion that = (KcdyQuestion) o;

        if (queId != that.queId) return false;
        if (userId != that.userId) return false;
        if (content != null ? !content.equals(that.content) : that.content != null) return false;
        if (ansTime != null ? !ansTime.equals(that.ansTime) : that.ansTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = queId;
        result = 31 * result + userId;
        result = 31 * result + (content != null ? content.hashCode() : 0);
        result = 31 * result + (ansTime != null ? ansTime.hashCode() : 0);
        return result;
    }
}
